package com.ruoyi.teaching.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teaching.mapper.OrderFoodRelationMapper;
import com.ruoyi.teaching.domain.OrderFoodRelation;
import com.ruoyi.teaching.service.IOrderFoodRelationService;

/**
 * 订单食物关系表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-08
 */
@Service
public class OrderFoodRelationServiceImpl implements IOrderFoodRelationService 
{
    @Autowired
    private OrderFoodRelationMapper orderFoodRelationMapper;

    /**
     * 查询订单食物关系表
     * 
     * @param oId 订单食物关系表主键
     * @return 订单食物关系表
     */
    @Override
    public OrderFoodRelation selectOrderFoodRelationByOId(Long oId)
    {
        return orderFoodRelationMapper.selectOrderFoodRelationByOId(oId);
    }

    /**
     * 查询订单食物关系表列表
     * 
     * @param orderFoodRelation 订单食物关系表
     * @return 订单食物关系表
     */
    @Override
    public List<OrderFoodRelation> selectOrderFoodRelationList(OrderFoodRelation orderFoodRelation)
    {
        return orderFoodRelationMapper.selectOrderFoodRelationList(orderFoodRelation);
    }

    /**
     * 新增订单食物关系表
     * 
     * @param orderFoodRelation 订单食物关系表
     * @return 结果
     */
    @Override
    public int insertOrderFoodRelation(OrderFoodRelation orderFoodRelation)
    {
        return orderFoodRelationMapper.insertOrderFoodRelation(orderFoodRelation);
    }

    /**
     * 修改订单食物关系表
     * 
     * @param orderFoodRelation 订单食物关系表
     * @return 结果
     */
    @Override
    public int updateOrderFoodRelation(OrderFoodRelation orderFoodRelation)
    {
        return orderFoodRelationMapper.updateOrderFoodRelation(orderFoodRelation);
    }

    /**
     * 批量删除订单食物关系表
     * 
     * @param oIds 需要删除的订单食物关系表主键
     * @return 结果
     */
    @Override
    public int deleteOrderFoodRelationByOIds(Long[] oIds)
    {
        return orderFoodRelationMapper.deleteOrderFoodRelationByOIds(oIds);
    }

    /**
     * 删除订单食物关系表信息
     * 
     * @param oId 订单食物关系表主键
     * @return 结果
     */
    @Override
    public int deleteOrderFoodRelationByOId(Long oId)
    {
        return orderFoodRelationMapper.deleteOrderFoodRelationByOId(oId);
    }
}
